import { Button } from "antd";
// import { connect } from "../../my-reactRedux";
import action from "../../store/actions";
import { connect } from "react-redux";
const VoteFooter = function VoteFooter(props) {
  let { support, oppose } = props;
  return (
    <div>
      <Button type="primary" style={{ marginRight: "20px" }} onClick={support}>
        支持
      </Button>
      <Button type="primary" danger onClick={oppose}>
        反对
      </Button>
    </div>
  );
};

export default connect(null, action.vote)(VoteFooter);

// export default connect(null, (dispatch) => {
//   return {
//     support() {
//       dispatch(action.vote.support());
//     },
//     oppose() {
//       dispatch(action.vote.oppose());
//     },
//   };
// })(VoteFooter);
